<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加优惠券</title>
    <link rel="stylesheet" href="/layui/css/layui.css"/>
    <link rel="stylesheet" href="/css/coupon/coupon-add.css"/>
    <script type="text/javascript" src="/layui/layui.js"></script>
</head>
<body>
    <div id="box">
        <!-- 头部开始 -->
        <div class="layui-row" >
            <div class="layui-elem-quote">
                <span style="font-size: 18px">添加优惠券</span>
                <span style="float: right;">
                    <button class="layui-btn" style="background-color: #2F4056;" onclick="javascript:Refresh()"><i class="layui-icon layui-icon-refresh"></i>刷新</button>
                    <button class="layui-btn" style="background-color: #2F4056;" onclick="javascript:goBack()"><i class="layui-icon layui-icon-left"></i>返回</button>
                </span>
            </div>
        </div>
        <!-- 头部结束 -->

        <!-- 主体开始 -->
        <form class="layui-form" action="">

            <div class="layui-form-item">
                <div class="layui-form-mid">优惠券名称:</div>
                <div class="layui-input-block">
                    <input class="layui-input" name="couponName" id="couponName" required  lay-verify="required" autocomplete="off" type="text" placeholder="请输入优惠名称" onfocus="this.placeholder=''" onblur="this.placeholder='请输入优惠名称'"/>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-form-mid">优惠券金额:</div>
                <div class="layui-input-block">
                    <input class="layui-input" name="couponPrice" id="couponPrice" required  lay-verify="required|price|number" autocomplete="off" type="text" placeholder="请输入优惠金额" onfocus="this.placeholder=''" onblur="this.placeholder='请输入优惠金额'"/>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-form-mid">开始时间:</div>
                <div class="layui-input-block">
                    <input class="layui-input" name="startDate" id="startDate" required  lay-verify="required" autocomplete="off" type="text" placeholder="请选择开始时间" onfocus="this.placeholder=''" onblur="this.placeholder='请选择开始时间'"/>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-form-mid">结束时间:</div>
                <div class="layui-input-block">
                    <input class="layui-input" name="endDate" id="endDate" required  lay-verify="required" autocomplete="off" type="text" placeholder="请选择结束时间" onfocus="this.placeholder=''" onblur="this.placeholder='请选择结束时间'"/>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-form-mid">优惠券图片:</div>
                <div class="layui-input-block">
                    <button type="button" style="background-color: #2F4056;" id="uploadImg" class="layui-btn"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                    <input type="text" required lay-verify="required" class="layui-hide" name="pricuteUrl"/>
                </div>
            </div>
            <div class="layui-form-item" id="images" style="display: none;">
                <div class="layui-form-mid">预览图片:</div>
                <div class="layui-input-block" id="image" style="margin-left: 110px;width: 300px">

                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-form-mid">上线/下线:</div>
                <div class="layui-input-block">
                    <input type="radio" name="online" value="2" title="上线" checked>
                    <input type="radio" name="online" value="3" title="下线">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-form-mid">发放量:</div>
                <div class="layui-input-block">
                    <input class="layui-input" name="issueQuantity" id="issueQuantity" required  lay-verify="required|price|number" autocomplete="off" type="text" placeholder="请输入发放数量" onfocus="this.placeholder=''" onblur="this.placeholder='请输入发放数量'"/>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-form-mid">发放方式:</div>
                <div class="layui-input-block">
                    <select name="grant" id="grant">
                        <option value="">请选择优惠券获取方式</option>
                        <option value="2">自动发放</option>
                        <option value="3">活动领取</option>
                        <option value="4">人工发放</option>
                        <option value="5">无限制</option>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-form-mid">优惠券类型:</div>
                <div class="layui-input-block">
                    <select name="type" id="type">
                        <option value="">请选择优惠券发放方式</option>
                        <option value="2">商品</option>
                        <option value="3">视频</option>
                    </select>
                </div>
            </div>

            <hr>

            <button type="button" lay-submit lay-filter="sub" class="layui-btn" id="submit" style="margin:10px 0px 0px 45%;background-color: #2F4056;">添加优惠券</button>

        </form>
        <!-- 主体结束 -->
    </div>
</body>
<script src="/js/coupon/coupon-add.js"></script>
</html>